package com.spleeb.pixelengine;

public class Satrix {
	public static Satrix identity = new Satrix();
	public float x = 0;
	public float y = 0;
	public float sx = 1;
	public float sy = 1;
	public float rot = 0;
	public Satrix(){
	}
	public Satrix(float x, float y, float sx, float sy, float rot) {
		this.x = x;
		this.y = y;
		this.sx = sx;
		this.sy = sy;
		this.rot = rot;
	}
	public final Satrix merge(Satrix satrix) {
		x = satrix.x + x * satrix.sx;
		y = satrix.y + y * satrix.sy;
		sx *= satrix.sx;
		sy *= satrix.sy;
		return this;
	}
	public final Satrix clone(){
		return new Satrix(x,y,sx,sy,rot);
	}
	public final void copy(Satrix satrix){
		x=satrix.x;y=satrix.y;sx=satrix.sx;sy=satrix.sy;rot=satrix.rot;
	}
}
